Conventionally, there are display devices which perform stereoscopic display. For example, Japanese Laid-Open Patent Publication No. 2004-7396 (hereinafter, referred to as Patent Literature 1) discloses adjustment of a parallax between a left image and a right image by a user, and which allows adjustment of stereoscopic effects of a stereoscopic image taken of a three-dimensional virtual space.
Patent Literature 1, however, has the following problems in the case where a user interface is superimposed on the three-dimensional virtual space and displayed, such as a game or the like. Even though the parallax is adjusted by the user, a parallax with respect to the user interface is a fixed parallax set by the game maker or ends up being a parallax according to the adjustment of the parallax with respect to the three-dimensional virtual space. Therefore, the user needs to change the focal length depending on the user's viewing style.
Therefore, an object of the present invention is to provide a display control technology which allows adjustment of a parallax depending on a situation so that, when a stereoscopic image is displayed, the parallax is gentle on the eyes of the user when viewing the stereoscopic image.
In order to achieve the object, the present invention employs the following features.
An embodiment of the present invention is a computer-readable storage medium having stored therein a display control program executed by a computer of a display control apparatus for displaying a three-dimensional virtual space or real space on a display device configured to perform stereoscopic display. The display control program causes the computer to function as: first acquisition means; first parallax adjustment means; second acquisition means; second parallax adjustment means; stereoscopic image generation means; and display control means. The first acquisition means acquires first input information from a user. The first parallax adjustment means adjusts a parallax of a user interface, based on the first input information acquired by the first acquisition means. The second acquisition means acquires second input information from the user. The second parallax adjustment means adjusts a parallax of the three-dimensional virtual space or real space, based on the second input information acquired by the second acquisition means. The stereoscopic image generation means generates a stereoscopic image including an image of the user interface in which the parallax thereof is adjusted by the first parallax adjustment means, and an image of the three-dimensional virtual space or real space in which the parallax thereof is adjusted by the second parallax adjustment means. The display control means displays on the display device the stereoscopic image generated by the stereoscopic image generation means.
According to the above configuration, the parallax of the user interface can be adjusted in addition to the adjustment of the parallax of the three-dimensional virtual space or real space, in accordance with an input from the user. This allows the parallax adjustment of the user interface separately from the parallax adjustment of the three-dimensional virtual space or real space, and therefore the user is able to adjust the user interface to his/her own viewing style.
Further, in another configuration of the present invention, the first parallax adjustment means may adjust the parallax of the user interface, based on the first input information acquired by the first acquisition means and the parallax adjusted by the second parallax adjustment means for the three-dimensional virtual space or real space.
According to the above configuration, the parallax of the user interface can be adjusted based on the first input information from the user and the parallax of the adjusted three-dimensional virtual space or real space. For example, the user is able to adjust the parallax of the user interface based on the parallax of the three-dimensional virtual space or real space adjusted by the user.
Further, in another configuration of the present invention, the first parallax adjustment means may adjust the parallax of the user interface within a range based on the parallax of the three-dimensional virtual space or real space.
According to the above configuration, the range of adjustment of the user interface can be determined based on the parallax of the three-dimensional virtual space or real space.
Further, in another configuration of the present invention, the first parallax adjustment means may adjust the parallax of the user interface by setting a reference value of the parallax of the user interface in accordance with the parallax of the three-dimensional virtual space or real space, and relatively changing the reference value in accordance with the first input information acquired by the first acquisition means.
According to the above configuration, the reference value of the parallax of the user interface is determined in accordance with the parallax of the three-dimensional virtual space or real space, and the parallax of the user interface can be adjusted in accordance with the input information from the user. This allows the user to adjust the parallax of the entirety of the stereoscopic image displayed on the display device by adjusting the parallax of the three-dimensional virtual space or real space, and further allows the user to adjust the parallax of the user interface only.
Further, in another configuration of the present invention, the stereoscopic image generation means may include: first stereoscopic image generation means; and second stereoscopic image generation means. The first stereoscopic image generation means generates a first stereoscopic image in which the user interface is rendered by the parallax adjusted by the first parallax adjustment means. The second stereoscopic image generation means generates a second stereoscopic image by taking images of the three-dimensional virtual space by a virtual stereo camera or taking images of the real space by a stereo camera. The stereoscopic image generation means generates the stereoscopic image by superimposing the first stereoscopic image and the second stereoscopic image one on the other.
According to the above configuration, the stereoscopic image can be generated by superimposing the first stereoscopic image in which the user interface is rendered and the second stereoscopic image taken, by the virtual stereo camera, of the three-dimensional virtual space one on the other. This allows the user interface to be displayed with a parallax different from the parallax of the three-dimensional virtual space.
Further, in another configuration of the present invention, the first stereoscopic image generation means may generate the first stereoscopic image by taking images of the user interface by a UI virtual stereo camera.
According to the above configuration, the first stereoscopic image taken of only the user interface can be generated by taking the images of the user interface by the UI virtual stereo camera.
Further, in another configuration of the present invention, the first parallax adjustment means may adjust the parallax of the user interface by setting, based on the first input information, a distance between virtual cameras at the left and at the right which are components of the UI virtual stereo camera.
According to the above configuration, the parallax of the user interface can be set by adjusting the distance between the cameras at the left and at the right which are the components of the UI virtual stereo camera.
Further, in another configuration of the present invention, the stereoscopic image generation means may generate the stereoscopic image by superimposing the first stereoscopic image on a front side of the second stereoscopic image.
According to the above configuration, since the first stereoscopic image taken of the user interface is superimposed on the front side of the second stereoscopic image, the user interface can always be displayed on the screen.
Further, in another configuration of the present invention, the first parallax adjustment means may adjust the parallax of the user interface by placing the user interface in the three-dimensional virtual space, based on the first input information. The stereoscopic image generation means generates the stereoscopic image by taking, by a virtual stereo camera, images of the three-dimensional virtual space in which the user interface is placed by the first parallax adjustment means.
According to the above configuration, the stereoscopic image taken of the three-dimensional virtual space including the user interface can be generated by placing the user interface in the three-dimensional virtual space.
Further, in another configuration of the present invention, a predetermined virtual object may be placed in the three-dimensional virtual space. The stereoscopic image generation means generates the stereoscopic image, as if, when seen from the virtual stereo camera, the user interface is positioned in front of the virtual object even when the user interface is positioned behind the virtual object.
According to the above configuration, the user interface can always be displayed on the screen.
Further, in another configuration of the present invention, when the parallax of the user interface is adjusted by the first parallax adjustment means, the display control program may further cause the computer to function as reference display means for displaying a reference display used in adjusting the parallax of the user interface.
According to the above configuration, when the parallax of the user interface is adjusted, the reference of the adjustment can be displayed on the display device configured to perform stereoscopic display (or another display device). This allows the user to easily adjust the parallax of the user interface.
Further, in another configuration of the present invention, the reference display means may display on the display device an auxiliary plane, as the reference display used in adjusting the parallax of the user interface, the auxiliary plane indicating a display position of the user interface in a direction perpendicular to a screen of the display device.
According to the above configuration, the auxiliary plane is displayed together with the user interface, and therefore the user can easily adjust the parallax of the user interface.
Further, in the present invention, the display control apparatus may be the realization of the means described above. Alternatively, in the present invention, a plurality of aspects, which realize the above means, may interact with one another, thereby being configured as one display control system. The display control system may be configured of a single apparatus, or may be configured of a plurality of apparatuses.
According to the present invention, the parallax of the user interface can be adjusted to the user's viewing style.
These and other objects, features, aspects and advantages of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings.